<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/

Route::get('/', ['middleware' => 'auth','uses'=>'Admin\AdminController@getIndex']);

Route::controllers([
	'auth'      =>  'Auth\AuthController',
	'password'  =>  'Auth\PasswordController',
	'admin'		=>	'Admin\AdminController'
]);
Route::resource('role','Admin\RoleController');
Route::resource('perms','Admin\PermsController');
Entrust::routeNeedsRole('admin/add*', array('god','admin'), null, false);
Entrust::routeNeedsRole('admin/edit*', array('god','admin','editor'), null, false);
Entrust::routeNeedsRole('admin/del*', array('god','admin'), null, false);
Entrust::routeNeedsRole('role/*','god');
Entrust::routeNeedsRole('perms/*','god');

